public class demo6 {
    public static void main(String[] args) {

        Thread thread = new Thread(()->{

            for (int i = 0; i < 5; i++) {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
                System.out.println("正在执行 thread 线程");
            }
        });
        thread.start();
        
    }
}
